
****** Replication Figures 2_3 for "Explaining Foreign Support for China's Global Economic Leadership," International Organization 
                     ***********------- By J. Lawrence BROZ   Zhiwen ZHANG    Gaoyang WANG --------***********

					 
					 
					 

******** Change this directory to the correct path on your computer:

  use "D:\stata11\ado\personal\broz_zhang_wang_bri_dataset.dta", clear
  

    
  
  
 ***---------------------------Taking log on GDP PER CAPITA--------------------------------***
 gen lppcgdpsm_a=log(ppcgdpsm_a)
 
 
 
 
 ***----------------------Clean up the data for LEADER IDEOLOGY----------------------------***
 
 replace dpi_ideology_n=. if dpi_ideology_n==-999
 
 
 
 
 
 ***---------------------------------Label Key Variables-----------------------------------***
  la var attendance_4_category  "Attendance (3=Head, 2=Minister, 1=Lower Official, 0=No Attending)"
 
 
 ***----------------Dependent variables-------------------***
 la var attendance  "DV=ATTENDANCE"
 la var attendance_3_category  "DV=ORDERED ATTENDANCE"
 
  
 ***-------------------Pull variables---------------------***
 la var obor_nations "ONE BELT, ONE ROAD POSITION"
 la var ftas "FTA WITH CHINA"
 la var bits "BIT WITH CHINA"
 
 
 ***-----------------------Push variables-----------------------***
 la var fc_dummy_cumcount_bank_s1_9016 "FINANCIAL CRISES"
 la var ka_open_sd9016 "VARIABILITY OF CAPITAL ACCOUNT POLICY"
 la var mean_portfolio_vol "VOLATILITY OF PORTFOLIO OUTFLOWS"
 
 la var imf_dummy_unrest_index_sum_9017 "SOCIAL UNREST DURING IMF PROGRAMS"
 
 la var wto_cases_cumulcount9516 "WTO COMPLAINTS AGAINST THE U.S."
 
 la var imf_governance_deficit_usd_2015 "IMF GOVERNANCE DEFICIT"
 
 
 
 ***----------------------Control variables-----------------------***
 la var idp_cn_1316  "IDEAL POINT DISTANCE FROM CHINA"
 la var regime_type "REGIME TYPE"
 la var dpi_ideology_n "LEADER IDEOLOGY"
 la var africa "AFRICA DUMMY"
 
 la var rgdppcg_usd2016 "GDP GROWTH"
 la var pgdpsm_a "GDP"  
 la var lppcgdpsm_a "LOG GDPPC"
 
 la var physint_mean_9011 "CIRI HUMAN RIGHTS INDEX"
 
   
  
    
********----------------------------MARGINAL EFFECTS----------------------------**********


********-------------Figure 2 from Model 8 in Table 4--------------********

set scheme plotplainblind

oprobit attendance_3  obor_nations ftas bits ka_open_sd9016  idp_cn_1316 regime dpi_ideology_n africa rgdppcg_usd2016  pgdpsm_a  lppcgdpsm_a physint_mean_9011, r
  
margins, dydx(*)
   
marginsplot, horizontal unique xline(0) recast(scatter) yscale(reverse) plot( , label("Not Attending" "Minister" "Head of State")) ylabel(1 "One Belt, One Road Position" 2 "FTA with China" 3 "BIT with China" 4 "Variability of Capital Account Policy" 5 "Ideal Point Distance to China" 6 "Regime Type" 7 "Leader Ideology" 8 "Africa" 9 "GDP Growth" 10 "GDP" 11 "GDPPC" 12 "CIRI Human Rights Index") title("Figure 2: Average Marginal Effects Variability of Capital Account Policy")

graph save Graph "Figure 2.gph"
graph export "Figure 2.pdf", as(pdf) replace

 
 
 
 
********------------Figure 3 from Model 10 in Table 4--------------********
 
oprobit attendance_3  obor_nations ftas bits imf_dummy_unrest_index_sum_9017  idp_cn_1316 regime dpi_ideology_n africa rgdppcg_usd2016  pgdpsm_a  lppcgdpsm_a physint_mean_9011, r

margins, dydx(*)
 
marginsplot, horizontal unique xline(0) recast(scatter) yscale(reverse)  plot( , label("Not Attending" "Minister" "Head of State")) ylabel(1 "One Belt, One Road Position" 2 "FTA with China" 3 "BIT with China" 4 "Social Unrest during IMF Programs" 5 "Ideal Point Distance to China" 6 "Regime Type" 7 "Leader Ideology" 8 "Africa" 9 "GDP Growth" 10 "GDP" 11 "GDPPC" 12 "CIRI Human Rights Index") title("Figure 3: Average Marginal Effects of Social Unrest During IMF Programs")



graph save Graph "Figure 3.gph"
graph export "Figure 3.pdf", as(pdf) replace
  